/**
 * 
 */
package com.thinkgsp.jxc.service.impl;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgsp.jxc.model.ProductContact;
import com.thinkgsp.jxc.persistence.ProductContactMapper;
import com.thinkgsp.jxc.service.ProductContactService;

/**
 * @author evan
 *
 */
@Service("productContactService")
@Transactional
public class ProductContactServiceImpl extends GeneralServiceImpl implements
		ProductContactService {

	@Autowired
	private ProductContactMapper productContactMapper;
	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.service.ProductContactService#setProductContactMapper(com.thinkgsp.jxc.persistence.ProductContactMapper)
	 */
	public void setProductContactMapper(
			ProductContactMapper productContactMapper) {
		this.productContactMapper = productContactMapper;
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.service.ProductContactService#getProductContactList(java.math.BigDecimal, java.math.BigDecimal, java.lang.Integer, java.lang.Integer, java.lang.Long)
	 */
	public List<ProductContact> getProductContactList(BigDecimal begPeriod,
			BigDecimal endPeriod, Integer invAddId, Integer productId,
			Long batchNoId) {
		return productContactMapper.getProductContactListByPeriod(begPeriod, endPeriod, invAddId, productId, batchNoId);
	}

	/* (non-Javadoc)
	 * @see com.thinkgsp.jxc.service.ProductContactService#getProductContactList(java.sql.Date, java.sql.Date, java.lang.Integer, java.lang.Integer, java.lang.Long)
	 */
	public List<ProductContact> getProductContactList(Date begDate,
			Date endDate, Integer invAddId, Integer productId, Long batchNoId) {
		return productContactMapper.getProductContactListByDate(begDate, endDate, invAddId, productId, batchNoId);
	}

}
